import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

// 阿里巴巴字体库
import "@/assets/font_3222443_khn97fxnl7g/iconfont.js";
// 清除默认样式
import "normalize.css/normalize.css";
// 点击复制
import VueClipboard from "vue-clipboard2";
// 代码高亮
import hljs from "highlight.js";
import "highlight.js/styles/atom-one-light.css";

createApp(App)
  .use(store)
  .use(router)
  .use(VueClipboard)
  .directive("highlight", function (el) {
    hljs.configure({ useBR: true });
    let blocks = el.querySelectorAll("pre code");
    blocks.forEach((block) => {
      hljs.highlightBlock(block);
    });
  })
  .mount("#app");
